﻿Type=Activity
Version=5.8
ModulesStructureVersion=1
B4A=true
@EndOfDesignText@
#Region  Activity Attributes 
	#FullScreen: False
	#IncludeTitle: True
#End Region

Sub Process_Globals
	'These global variables will be declared once when the application starts.
	'These variables can be accessed from all modules.

End Sub

Sub Globals
	'These global variables will be redeclared each time the activity is created.
	'These variables can only be accessed from this module.

	Private vpager As AHViewPager
	Private pages As AHPageContainer
	Private clv1,clv2,clv3 As clsCustomListView
	Private vptp As Panel

	Private itemjinqiiv As ImageView
	Private itemjinqistuname As Label
	Private itemjinqistugrade As Label
	Private itemjinqievaltext As Label
	Private itemstuheaderriv As RIV
End Sub

Sub Activity_Create(FirstTime As Boolean)
Dim telaw As telanywhere
telaw.Initialize(Activity)

	'Do not forget to load the layout file created with the visual designer. For example:
	Activity.LoadLayout("layevallist")
	initviews
End Sub
Sub initviews
	
	pages.Initialize
	Dim p As Panel
	p.Initialize("")
	pages.AddPage(p,"好评")
	clv1.Initialize(Me,"clv1")
	p.AddView(clv1.AsView,0,0,100%x,vpager.Height)
	Dim p2 As Panel
	p2.Initialize("")
	pages.AddPage(p2,"中评")
	clv2.Initialize(Me,"clv2")
	p2.AddView(clv2.AsView,0,0,100%x,vpager.Height)
	Dim p3 As Panel
	p3.Initialize("")
	pages.AddPage(p3,"差评")
	clv3.Initialize(Me,"clv3")
	p3.AddView(clv3.AsView,0,0,100%x,vpager.Height)
	vpager.PageContainer=pages
'	Dim vpt As AHViewPagerSupportTabs
'	vpt.Initialize(vpager,True,5dip)
'	vpt.DrawFullUnderline=True
'	vpt.TabIndicatorColor=comm.N_COLOR_TITLE
	Dim vpt As AHViewPagerTabs
	vpt.Initialize(vpager)
	vptp.AddView(vpt,0,0,vptp.Width,vptp.Height)
	vpt.RefreshTitles
	filldata
End Sub
Sub filldata
	Dim nh As Int=80dip
	For i=0 To 2
		Dim jq As Jinqi
		jq.Initialize
		jq.sendby.Initialize
		jq.sendby.name="张三"
		jq.sendby.grade="初三"
		jq.sendby.school="一中"
		jq.evalStr="教的还不错 2016-03-05"
		clv1.Add(CreateEvalItem(jq,100%x,nh,i),nh,i)
		clv2.Add(CreateEvalItem(jq,100%x,nh,i),nh,i)
		clv3.Add(CreateEvalItem(jq,100%x,nh,i),nh,i)
	Next
End Sub
Private Sub CreateEvalItem(jq As Jinqi,w As Int,h As Int,i As Int) As Panel
	Dim p As Panel
	p.Initialize("")
	Activity.AddView(p,0,0,w,h)
	p.LoadLayout("itemjinqi")
	p.RemoveView
	comm.loadimg(comm.S_TESTMYHEADER,itemstuheaderriv)
	itemjinqievaltext.Text=jq.evalStr
	itemjinqiiv.Visible=False
	itemjinqistugrade.Text=jq.sendby.grade
	itemjinqistuname.Text=jq.sendby.name
	Return p
End Sub
Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub ivback_Click
	
End Sub

Sub vpager_PageChanged (Position As Int)
	Log(Position)
End Sub